
---@class CustomAttackAction:ActionBase
CustomAttackAction = class(ActionBase)

function CustomAttackAction:GetLabel()
    return ECustomActionLabel.Attack;
end

function CustomAttackAction:GetCost()
    return 3;
end

function CustomAttackAction:GetPriority()
    return 5;
end

function CustomAttackAction:GetCanInterruptiblePlan()
    return false;
end

function CustomAttackAction:InitPreconditions()
    local state = State.new()
    state:Set(ECustomStateKey.Find_target,true);
    state:Set(ECustomStateKey.NearTarget,true);
    state:Set(ECustomStateKey.CanAttackTarget,true);
    return state;
end

function CustomAttackAction:InitEffects()
    local state = State.new()
    state:Set(ECustomStateKey.CanAttackTarget,false);
    return state;
end